﻿#include "stdafx.h"
#include "MonitorProcess.h"

int main(int argc, char* argv[])
{
	if (argc == 2)
	{
		std::string ProcessName = argv[0];
		std::string TargetCrashPath = argv[1];
		std::cout << "使用命令行创建进程" << ProcessName << ' ' << TargetCrashPath << std::endl;
		CMonitorProcess::createMonitorProcessInstance(ProcessName, TargetCrashPath);
	}
	else
	{
		std::string SolutionDir;
		CMonitorProcess::dumpSolutionDir(SolutionDir);
		CMonitorProcess::createMonitorProcessInstance("UnrealEditor.exe", SolutionDir + "UI_Monitor\\Saved\\Crashes\\");
	}
	CMonitorProcess::getMonitorProcessInstance()->createWindowAndLoop();
	return 0;
}